package com.qingzhuge.scheduler.dto.request;

import com.qingzhuge.dto.request.BaseRequestPkLongDto;
import com.qingzhuge.scheduler.enums.JobState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.time.LocalDateTime;

/**
 * @author : zero.xiao
 * @description :
 * @date :2019-05-20 16:42
 * @modified :
 */
@ApiModel("任务调度运行日志")
@Setter
@Getter
public class SysTaskRunLogRequestDto extends BaseRequestPkLongDto {
    @ApiModelProperty("分组名称")
    private String groupName;
    @ApiModelProperty("开始时间")
    private LocalDateTime startTime;
    @ApiModelProperty("结束时间")
    private LocalDateTime endTime;
    @ApiModelProperty("状态")
    private JobState status;
    @ApiModelProperty("运行主机")
    private String serverHost;
    @ApiModelProperty("任务信息")
    private String fireInfo;
    @ApiModelProperty("任务id")
    private Long scheduledId;
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
